<?php

class News_Widgets_Relate_Widget extends Tomato_Widget{
    protected function _prepareShow() {
        $request = $this->_request;
        $limit = $request->getParam('limit', 10);
        $article_id = $request->getParam('article_id');
        $articleModel = Rabbit_Model_Factory::getInstance()->setModule('news')->getArticleModel();
        $relate = $articleModel->getRelate($article_id, $limit);
        $this->_view->assign('relateArticles', $relate);
    }
}
?>
  